﻿using System.Windows.Forms;
using Presentation;
using Presentation.ViewInterfaces;
using Repositories;

namespace CampaignManager
{
    public partial class CharacterControl : UserControl, ICharacterControlView
    {
        public CharacterControl(string characterName)
        {
            InitializeComponent();
            CharacterName = characterName;
            Presenter = new CharacterControlPresenter(this, new CharacterRepository());
            Presenter.DisplayCharacter();
        }

        public string CharacterName
        {
            get
            {
                return CharacterNameTextBox.Text;
            }
            set
            {
                CharacterNameTextBox.Text = value;
            }
        }

        private CharacterControlPresenter Presenter { get; set; }
    }
}